-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
providers/aws: resource aws_route53_zone_association #1827
Conversation
this is a rough sketch.
|
@pmoust @catsby This may be AWS related. Not sure about the API, but if a zone is created outside of a VPC, it is made a public zone. It cannot (from the console) be made private or associated with a VPC after it is made public. In a previous PR related to this same functionality, the VPC was assigned when the zone was created and it automatically made it private vs public. By creating the zone, then associating it to a VPC, I fear that may be an illegal action (taking from public when it is created to private by associating it to a VPC). I may be wrong, but this is not possible from the console. |
@pmoust @catsby I have been able to confirm that the zone you are attempting to associate must already exist as a private zone before you can associate it with a VPC which means it must be associated with a VPC at the time of it's creation. So, either you will have to add VPC.id and region to the zone when it is created in the fist place (essentially eliminating the need for zone association within the terraform file that created the zone). Or you will need to to make sure this is called first and if the zone doesn't exist, then create it with this VPC and region associated with it. #1159 provided this functionality. Once the zone is created and already associated with some VPC, then this would be applicable as far as I can tell. Even if you do associate it with another VPC first, it must be in the same region in order for this to work. |
And this might explain the acc test failure.
Need to add the private zone definition on parent resource as well, as you
mentioned!
|
There is relevance to #1526 on this. |
abcb7c6
to
61df82a
Compare
@catsby please take a look at the acceptance test panicking. Also we could just remove the @kendawg2 / @johnrengelman thoughts? |
@pmoust I think having a zone association resource is OK for use when a Zone already exists. So this is kind of a two part process. When the zone is created, it needs to be associated with a VPC. If it is created in a plan that also creates the same VPC, then an association isn't needed. However, if a subsequent plan needs to use the same zone file, it would use an association resource rather than create the zone. Or, if you are creating multiple VPC's in the same plan that all need the same zone file, then an association resource would be needed. I would start with the basic create a private zone associated with a single VPC. Let's get that working and then add the association separately. I think the basic private zone associated with only one VPC covers the 99% case, but the other is important as well. |
I've pulled these changes into my PR and am working out some bugs. Having some problems with testing cross-region stuff. Should have this finished tonight/tomorrow. |
Closing in favor of #1526 |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
wip adding
aws_route53_zone_association
as